package com.may.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.may.entity.Permission;
import com.may.entity.User;
import com.may.mapper.UserMapper;
import com.may.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author mayuanbao
 * @date 2020-07-10 20:22
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Resource
    UserMapper userMapper;

    @Override
    public User findRoleByUserName(String name) {
        return userMapper.findRoleByUserName(name);
    }

    @Override
    public List<Permission> findPermissionByRoleId(Integer id) {
        return userMapper.findPermissionByRoleId(id);
    }
}
